package org.dicker.biz.impl;

import java.util.ArrayList;
import java.util.List;

import org.dicker.biz.BillBiz;
import org.dicker.dao.BillDao;
import org.dicker.dao.impl.BillDaoImpl;
import org.dicker.entity.BillInfo;
import org.dicker.entity.BillSelector;
import org.dicker.util.ORMUtil;

public class BillBizImpl implements BillBiz {
	
	private BillDao dao = new BillDaoImpl();
	
	public int selectCount(BillSelector bs) {
		return dao.selectCount(bs);
	}
	
	public List<BillInfo> selectByUser(String open_id,BillSelector bs){
		return dao.selectByUser(open_id,bs);
	}
	
	public List<BillInfo> selectByUser(int user_id){
		return dao.selectByUser(user_id);
	}
	
	/**查询单个账单*/
	public BillInfo selectOne(int bill_id) {
		return dao.selectOne(bill_id);
	}
	/**
	 * 查询全部账单信息
	 */
	public List<BillInfo> selectAll(BillSelector bs){
		return dao.selectAll(bs);
	}
	
	/**
	 * （删除）
	 */
	public boolean delete(String bill_ids) {
		return dao.delete(bill_ids);
	}
	
	/**
	 * 添加
	 * */
	public boolean add(BillInfo b) {
		return dao.add(b);
	}
	/**
	 * 修改
	 * */
	public boolean update(BillInfo b) {
		return dao.update(b);
	}

	@Override
	public List<BillInfo> selectByUserTypes(String open_id,String month, BillSelector bs) {
		return dao.selectByUserTypes(open_id,month,bs);
	}
	
	
}
